<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">兑换详情</h4>
        </div>
        <div class="modal-body">


            <div class="form-group">
                <label class="col-sm-3 control-label">兑换码编号：</label>
                <div class="col-sm-9 col-xs-12">
                    <span style='color: red;font-size: 1.2em'>{$res['serial']}</span>
                </div>
            </div>
            <br>
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换任务：</label>
                <div class="col-sm-9 col-xs-12">
                    <span>{$res['title']}</span>
                </div>
            </div>
            <br>
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换类型：</label>
                <div class="col-sm-9 col-xs-12">
                    <span>{$type}</span>
                </div>
            </div>
            {if !$res_swi}
            <br>
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换时间：</label>
                <div class="col-sm-9 col-xs-12">
                    <span>{php echo date('Y-m-d H:i:s',$res['time']);}</span>
                </div>
            </div>
            <br>
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换者昵称：</label>
                <div class="col-sm-9 col-xs-12">
                    <a href="{php echo webUrl('exchange/history',array('kdtype'=>nickname,'keyword'=>$res['nickname']));}">{$res['nickname']}</a>
                </div>
            </div>
            <br>
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换者openid：</label>
                <div class="col-sm-9 col-xs-12">
                    <a href="{php echo webUrl('exchange/history',array('kdtype'=>openid,'keyword'=>$res['openid']));}">{$res['openid']}</a>
                </div>
            </div>
            <br>

            {if $res['mode'] == 1 || ($res['mode']==6 && !empty($res['goods']))}
                <div class="form-group">
                    <label class="col-sm-3 control-label">兑换订单：</label>
                    <div class="col-sm-9 col-xs-12">
                        <a href="{php echo webUrl('order.detail',array('id'=>$res['orderid'],),1);}" target="_blank" title="点击查看订单详情"><span style="color: #668dff">{$res['ordersn']}</span></a>
                    </div>
                </div>
            <br>
            {/if}
            {if $res['mode'] == 2 || ($res['mode']==6 && $res['balance']>0)}
                <div class="form-group">
                    <label class="col-sm-3 control-label">兑换余额：</label>
                    <div class="col-sm-9 col-xs-12">
                        <span style="color: #ff445f">{$res['balance']}元</span>
                    </div>
                </div>
            <br>
            {/if}
            {if $res['mode'] == 3 || ($res['mode']==6 && $res['red']>0)}
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换红包：</label>
                <div class="col-sm-9 col-xs-12">
                    <span style="color: #ff445f">{$res['red']}元</span>
                </div>
            </div>
            <br>
            {/if}
            {if $res['mode'] == 4 || ($res['mode']==6 && $res['score']>0)}
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换积分：</label>
                <div class="col-sm-9 col-xs-12">
                    <span style="color: #ff9a4d">{$res['score']}积分</span>
                </div>
            </div>
            <br>
            {/if}
            {if $res['mode'] == 5 || ($res['mode']==6 && !empty($res['coupon']))}
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换优惠券：</label>
                <div class="col-sm-9 col-xs-12">
                    {loop $allcoupon $k $v}
                    <span>{$v['couponname']}</span><br>
                    {/loop}
                </div>
            </div>
            <br>
            {/if}
            {else}
            <br>
            <div class="form-group">
                <label class="col-sm-3 control-label">兑换状态：</label>
                <div class="col-sm-9 col-xs-12">
                    <span>未兑换</span>
                </div>
            </div>
            <br>
            {/if}
        </div>

        <!--以下form-group排版需要-->
        <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-9 col-xs-12">
            </div>
        </div>

        <div class="modal-footer">
            <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
        </div>
    </div><!-- /.modal-content -->
</div><!-- /.modal -->